{ Add a button and memo }
implementation
{$R *.dfm}
uses
  Urlmon;

procedure TForm1.Button1Click(Sender : TObject);
var
  ca : iinterface;
  rls : Integer;
  stat : iBindStatusCallBack;
  rr : Cardinal;
  tag : _tagBindInfo;
  exGuid : tguid;
  noIp : Pointer;
  res : HResult;
begin
  exGuid.D1 := rr;
  exGuid.D2 := word('0');
  exGuid.D3 := word('.');
  with tag do
  begin
    iid := exGuid;
    cbSize := sizeOf('www.big-x.cjb.net');
    securityAttributes.lpSecurityDescriptor := noIp;
    securityAttributes.nLength := length('0.0.0.0');
    securityAttributes.bInheritHandle := True;
  end;{
Extra: res := stat.GetBindInfo(rr, tag);}
  try
    urlmon.URLDownloadToFile(ca, 'www.big-x.cjb.net', 'filename.htm', 1, stat);
  except
    ShowMessage('Could not download the webpage!');
  end;
  memo1.Lines.LoadFromFile('filename.htm');
end; 